package gc;/** * @Author: Beating Pupils * @Date: 2020/7/28 10:45 * @Description: 模拟bi系统，每秒钟产生5M数据. 用jstat查看各个内存空间的使用情况 * -XX:NewSize=104857600 -XX:MaxNewSize=104857600 -XX:InitialHeapSize=209715200 -XX:MaxHeapSize=209715200 - * XX:SurvivorRatio=8 -XX:MaxTenuringThreshold=15 -XX:PretenureSizeThreshold=3145728 -XX:+UseParNewGC - * XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Xloggc:gcCommond.log */public class GcCommond1 {    public static void main(String[] args) throws InterruptedException {        Thread.sleep(30000);        while (true){            loadData();        }    }    public static void loadData() throws InterruptedException {        byte[] data = null;        for (int i = 0; i < 50; i++) {            data = new byte[100*1024];        }        data = null;        Thread.sleep(1000);    }}